<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>关键问题 - 1 - 修改状态</title>
</head>
<body>
    <script>
        let p = new Promise((resolve, reject) => {
            //1. resolve
            // resolve('OK');
            //2. reject
            // reject('Error');
            //3. 抛出错误
            // throw '有点问题'

            //promise 状态只能改变一次  **** 
            reject('NO');
            resolve('Yes');
        });

        console.log(p);

    </script>
</body>
</html>